using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SiteECSWeb;

/// <summary>
/// Summary description for Class1
/// </summary>
namespace SiteECSWeb
{
    public class MarketStudyInfo : Control
    {
        public MarketStudyInfo() :
            this(int.MinValue, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, DateTime.Today)
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public MarketStudyInfo(int mstudyID,string name, string memo, 
            string prodcuctName, string countryName, string countryNameEn, string imgPath, DateTime datepub)
        {
            _mstudyID = mstudyID;
            _name = name;
            _memo = memo;
            _prodcuctName = prodcuctName;
            _countryName = countryName;
            _countryNameEn = countryNameEn;
            _imgPath = imgPath;
            _datePub = datepub;
            //_pageControl = pageControl;
            
        }
        private int _mstudyID;

        public int MStudyID
        {
            get { return _mstudyID; }
            set { _mstudyID = value; }
        }

        private string _name;
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
        private string _memo;
        public string Memo
        {
            get { return _memo; }
            set { _memo = value; }
        }
        private DateTime _datePub;
        public DateTime DatePub
        {
            get { return _datePub; }
            set { _datePub = value; }
        }
        private string _prodcuctName;

        public string ProductName
        {
            get { return _prodcuctName; }
            set { _prodcuctName = value; }
        }
        public string NavUrlDetails
        {
            get
            {
                return ResolveClientUrl(Helper.NavURLParamsStringVirtualName
                    (_mstudyID, Globals.Settings.VirtualNamesInfo.MStudyDetails));
            }
        }
        public string NavUrlCountryList
        {
            get
            {
                return ResolveClientUrl(Helper.NavURLParamsStringVirtualName
                    (_countryNameEn, Globals.Settings.VirtualNamesInfo.MStudyCountryList, true));
            }
        }
        private string _imgPath;

        public string ImgPath
        {
            get 
            {
                if (!string.IsNullOrEmpty(_imgPath))
                {
                    if (!_imgPath.Contains(Globals.Settings.UploadInfo.RootAttachFolder))
                    {
                        _imgPath = Globals.Settings.UploadInfo.RootAttachFolder +
                            _imgPath;
                    }
                }
                else
                {
                    _imgPath = Globals.Settings.UploadInfo.ImgEmptyBook;
                }
                
                return  ResolveClientUrl(_imgPath); 
                
            }
            set { _imgPath = value; }
        }
      
	 
        private string _countryName;

        public string CountryName
        {
            get { return _countryName; }
            set { _countryName = value; }
        }
        private string _countryNameEn;

        public string CountryNameEn
        {
            get { return _countryNameEn; }
            set { _countryNameEn = value; }
        }
    }
}

